<?php echo $this->render("header.phtml"); ?>
<label class="title">Quản lý tin nhắn - Tin nhắn đến.</label>
<div class="horiz_sep">&nbsp;</div>
<table cellpadding="0" cellspacing="0" width="100%">
<?php
$messages = $this->messages;
$utilities = $this->utilities;
	foreach ($messages as $message) {		
?>
  	<tr>
    	<td style="padding-top: 5px;">
    		<table cellpadding="3" cellspacing="0" width="100%" style="border: 1px solid #81d2f6;">
    			<tr style="background-color: #81d2f6;">
    				<td align="right">
	    				<a href="<? echo $this -> baseUrl ?>/<?= $this->contextPath ?>/reply/id/<?= $message->pm_id; ?>">Reply</a>
						&nbsp;&nbsp;
						<a href="javascript:eway.confirm('<? echo $this -> baseUrl ?>/<?= $this->contextPath ?>/delete/id/<?= $message->pm_id; ?>', 'Are you sure you want to delete this message?');">Delete</a>
    				</td>
    			</tr>
    			<tr>
    				<td>    					
    					<b>Nhận từ: <?php echo $message->name; ?></b>    						
    				</td>
    			</tr>
    			<tr>
    				<td>    					
    					<b>Tóm tắt nội dung:</b>    						
    				</td>
    			</tr>    			
    			<tr>
    				<td>
    					<a href="<? echo $this -> baseUrl ?>/<?= $this->contextPath ?>/view/id/<?= $message->pm_id; ?>">    						
    						<?php echo $utilities->substring($message->pm_title, 200); ?>
    					</a>
    				</td>
    			</tr> 			
    		</table>
    	</td>    	
  	</tr>
<? } ?>
<tr>
	<td>
		<?php echo $this->page; ?>
	</td>
</tr>
</table>
<?php echo $this->render("footer.phtml"); ?>